<template>
  <div>
    <el-image :src="img">
      <div slot="error" class="image-slot">
        <!-- 解析失败以后的处理，我们的也许需求是设置默认图片 -->
        <img src="../../assets/common/head.jpg" alt="" class="errimg">
      </div>
    </el-image>
  </div>
</template>

<script>
export default {
  props: {
    img: {
      type: String,
      default: ''
    }
  }
}
</script>

<style lang="scss" scoped>
.errimg{
    width: 100px;
    height: 100px;
    border-radius: 50%;
}
</style>
